<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="renderer" content="webkit">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>自然担保人信息</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body>
		<form id="prj_cst_form">
             <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">
               <div class="fieldBox col_50" >
                    <div class="label">担保人名称</div>
                    <div class="field">
                 <input name="prjCstId" id="prjCstId" type="hidden" class="ui-textbox" value="${cst.id}" >
                          <span>${cst.cstNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_50" >
                    <div class="label">联系电话</div>
                    <div class="field">
                          <span>${mp1}</span>
                    </div>
                </div>
                <div class="fieldBox col_50" id="genderCdNmDiv">
                    <div class="label">性别</div>
                    <div class="field">
                        <span>${genderCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">身份证号码</div>
                    <div class="field">
                          <span>${cst.certNo}</span>
                    </div>
                </div>
                
                <div class="fieldBox col_50">
                    <div class="label">与承租人关系</div>
                    <div class="field">
                          <span>${cst.rlCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">担保属性</div>
                    <div class="field">
                          <span>${guaraTypCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">合同签署方式</div>
                    <div class="field">
                          <span>${cntTypCdNm}</span>
                    </div>
                </div>
                <div class="fieldBox col_100" id="visRecDiv">
                    <div class="label">访谈记录</div>
                    <div class="field" style="width: 100%;">
                        <textarea name="visRec" id="visRec" rows="4" class="l-textarea" style="width:99%" disabled="disabled" readonly="readonly">${cst.visRec}</textarea>
                    </div>
                </div>
            </div>
        </form>
	<script>
		$(function() {
		   $("#prj_cst_form").ligerForm({
                validate: true
           });
		   var showGuarPart = '${showGuarPart}';
            if (showGuarPart == '1'){
                $("#genderCdNmDiv").hide();
                $("#visRecDiv").hide();
            }
		    $("#prj_cst_add_btn").click(function(event) {
	            var ligerForm = liger.get("prj_cst_form");
	            if (!ligerForm.valid()) {
	                top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO,SQ_type: "warning"});
	                return false; //验证不通过，不执行以下代码
	            }
	            var data = ligerForm.getData();
	            var url = '<%=path%>/project/prjcstbscInfo/modify.do';
	            data["id"]= $("#prjCstId").val();
	            data["rlCd"] =rlCd;
	            var wait_dialog;
	            $.ajax({
	        		type: 'post',
	        		dataType:'json',
	        		data:data,
	        		url: url,
	        		beforeSend: function(){
		  		          wait_dialog=$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING ,SQ_type: "waitting" });
		  		     },
	        		success:function(msg){
	        			 wait_dialog.close();
	        			 if(msg.success == 1){
	        				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "success"});
	        				 parent.npgrid.reload();
	        				 frameElement.dialog.close();
	        			 }else{
	        				 top.$.ligerDialog.SQalert({content: msg.info,SQ_type: "error"});
	        			 }
	        		}
	        	});
	        });
	        
	        //取消
	        $("#prj_cst_cancel_btn").click(function(event) {
	        	frameElement.dialog.close();
	        });
	        
		});
		
	</script>

</body>
</html>